package mx.com.theboard.menu;



import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;

public class BotonMenu extends CustomComponent implements LayoutClickListener {
		
	public BotonMenu(String imgstr,String stylename){		
		VerticalLayout vl = new VerticalLayout();
		Embedded icono = new Embedded("", new ThemeResource("../theBoard/images/"+imgstr));
		vl.addComponent(icono);
		vl.setComponentAlignment(icono, Alignment.TOP_LEFT);		
		setCompositionRoot(vl);
		icono.setStyleName(stylename);
		vl.addListener((LayoutClickListener) this);
		vl.setMargin(false);		
		vl.setWidth("72px");
		icono.setCaption(null);
		
		
	}


	public void layoutClick(LayoutClickEvent event) {
		//to-do
	}

	
	
	
	
}
